import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'

// 配置路由
const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/news',
    children: [
      {
        path: 'user',
        name: 'User',
        component: ()=>import("@/views/User"),
      },
      {
        path: 'book',
        name: 'Book',
        component: ()=>import("@/views/Book"),
      },
      {
        path: 'bookClassification2',
        name: 'BookClassification2',
        component: ()=>import("@/views/BookClassification2"),
      },
      {
        path: 'sojob',
        name: 'Sojob',
        component: ()=>import("@/views/Sojob"),
      },
      {
        path: 'companyRank',
        name: 'CompanyRank',
        component: ()=>import("@/views/CompanyRank"),
      },
      {
        path: 'news',
        name: 'News',
        component: ()=>import("@/views/News"),
      },
      {
        path: 'person',
        name: 'Person',
        component: ()=>import("@/views/Person")
      },
      {
        path: 'itemBank',
        name: 'ItemBank',
        component: ()=>import("@/views/ItemBank")
      },
      {
        path: 'echarts',
        name: 'Echarts',
        component: ()=>import("@/views/Echarts")
      },
      {
        path: 'questionCenter',
        name: 'QuestionCenter',
        component: ()=>import("@/views/QuestionCenter")
      },
      {
        path: 'wordCloud',
        name: 'WordCloud',
        component: ()=>import("@/views/WordCloud")
      },
      {
        path: 'pieChart',
        name: 'PieChart',
        component: ()=>import("@/views/PieChart")
      },
      {
        path: 'mavonDisplay',
        name: 'MavonDisplay',
        component: ()=>import("@/views/MavonDisplay")
      },
      {
        path: 'previewMarkdown',
        name: 'PreviewMarkdown',
        component: ()=>import("@/views/PreviewMarkdown")
      },
      {
        path: 'lineChart',
        name: 'LineChart',
        component: ()=>import("@/views/LineChart")
      },
      {
        path: 'chinaMap',
        name: 'ChinaMap',
        component: ()=>import("@/views/ChinaMap")
      },
      {
        path: 'bookClassification',
        name: 'BookClassification',
        component: ()=>import("@/views/BookClassification")
      },
      {
        path: 'scatter',
        name: 'Scatter',
        component: ()=>import("@/views/Scatter")
      },
      {
        path: 'stackedBar',
        name: 'StackedBar',
        component: ()=>import("@/views/StackedBar")
      },
      {
        path: 'knowledge',
        name: 'Knowledge',
        component: ()=>import("@/views/Knowledge")
      },
        {
            path: 'reviewTestKnowledge',
            name: 'ReviewTestKnowledge',
            component: ()=>import("@/views/ReviewTestKnowledge")
        },
      {
        path: 'scatterClustering',
        name: 'ScatterClustering',
        component: ()=>import("@/views/ScatterClustering")
      },
      {
        path: 'simpleGraph',
        name: 'SimpleGraph',
        component: ()=>import("@/views/SimpleGraph")
      },
      {
        path: 'methodHold',
        name: 'MethodHold',
        component: ()=>import("@/views/MethodHold")
      },
      {
        path: '/test',
        name: 'Test',
        component: ()=>import("@/views/Test")
      },
        {
            path: '/jobCity',
            name: 'JobCity',
            component: ()=>import("@/views/Test")
        },
        {
            path: '/citySalary',
            name: 'CitySalary',
            component: ()=>import("@/views/CitySalary")
        },
      {
        path: '/citySalary2',
        name: 'CitySalary2',
        component: ()=>import("@/views/CitySalary2")
      },
        {
            path: '/languageRate',
            name: 'LanguageRate',
            component: ()=>import("@/views/LanguageRate")
        },
       {
            path: '/passRate',
            name: 'PassRate',
            component: ()=>import("@/views/PassRate")
        },
      {
        path: '/lineRace',
        name: 'LineRace',
        component: ()=>import("@/views/LineRace")
      },
      {
        path: '/barRace',
        name: 'BarRace',
        component: ()=>import("@/views/BarRace")
      },
      {
        path: '/roseType',
        name: 'RoseType',
        component: ()=>import("@/views/RoseType")
      },
      {
        path: '/markdown',
        name: 'Markdown',
        component: ()=>import("@/views/Markdown")
      },
      {
        path: '/practiceMost',
        name: 'PracticeMost',
        component: ()=>import("@/views/PracticeMost")
      },
      {
        path: '/contest',
        name: 'Contest',
        component: ()=>import("@/views/Contest")
      },
      {
        path: '/game',
        name: 'Game',
        component: ()=>import("@/views/Game")
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: ()=>import("@/views/Login")
  },
  {
    path: '/register',
    name: 'Register',
    component: ()=>import("@/views/Register")
  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
